<?php
/* 
 * ebiz front
 * 
 * ConfigConstants
 * 
 * @author allen
 * 
 */

class ConfigConstants {
	 
	public static $verificationEmail = "verification_email";
	public static $shippingRate = "shipping_rate";
	public static $wwwConstants = "www";
	public static $iConstants = "i";
	public static $piConstants = "pi";
//	public static $domainPath = "www.akimimidomain.com";
	public static $domainPath = DOMAIN_PATH;
	
	public static function getTImagePath(){
		$config = $GLOBALS["config"];
		$path = "//".ConfigConstants::$iConstants.".".DOMAIN."/t/".$config['template_name']."/image";
		return $path;
	}
	
	/**
	 * image size: 800 , 700 , 600 , 500 , 400 , 300 , 250 , 200 , 160 , 120 , 100 , 80 , 60
	 *             800 ,    600,           400,        250, 200,  160,  120,  100 ,80 ,60
	 * @param unknown_type $imgSize
	 * @return unknown
	 */
	public static function getDefaultProductImagePath($imgSize = 250){
		$config = $GLOBALS["config"];
		$path = "//".ConfigConstants::$iConstants.".".DOMAIN."/t/".$config['template_name']."/image/product_".$imgSize.'.jpg';
		return $path;
	}
	
	/**
	 * Get product image src
	 *
	 * @param string $floder product_image.floder
	 * @param string $name product_image.name
	 * @return string
	 */
	public static function getProductImagePath($floder, $name, $size){
		$path = "//".ConfigConstants::$piConstants.".".DOMAIN."/p".$floder.$name."_".$size.".jpg";
		return $path;
	}
	
	/**
	 * Get product image blob src , point at color folder
	 *
	 * @param string $floder product_image.floder
	 * @param string $name product_image.name
	 * @return string
	 */
	public static function getProductBolbColorPath($name){
		$config = $GLOBALS["config"];
		$defaultImgPath = "FFFFFF";
		if( empty($name) ){
			$path = "//".ConfigConstants::$iConstants.".".DOMAIN."/t/".$config['template_name']."/image/color/" . $defaultImgPath . ".jpg";
		}else{
		    $path = "//".ConfigConstants::$iConstants.".".DOMAIN."/t/".$config['template_name']."/image/color/" . $name . ".jpg";
		}
		return $path;
	}
	
	
    /**
     * get the layout path of t/default_zh_cn path 
     */
    public static function getTLayoutPath() {
        $config = $GLOBALS["config"];
        $path = "//".ConfigConstants::$iConstants.".".DOMAIN."/t/".$config['template_name'];
        return $path;
    }
    
    /**
     * get the layout path of n path 
     */
    public static function getNPath() {
        $path = "//".ConfigConstants::$iConstants.".".DOMAIN."/n";
        return $path;
    }
    
    /**
     * get the private image path 
     */
    public static function getPrivateImagePath(){
        $path = "//".ConfigConstants::$piConstants.".".DOMAIN;
        return $path;
    }
    
    /**
     * 兑换礼品路径
     */
    public static function getGiftImagePath(){
        $path = "//".ConfigConstants::$piConstants.".".DOMAIN."/gift/";
        return $path;
    }
    
    
}



